home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fritz: All Fritz
/
All Fritz.zip
/
All Fritz
/
FILES
/
EDUCNOMY
/
ASTROSET.LZH
/
LUNAR.BAS
< prev
next >
Wrap
BASIC Source File
|
1985-12-20
|
2KB
|
58 lines
100 REM COMPUTING LUNAR HEIGHTS
110 REM
120 INPUT "HALF-CHORD (MM) ";L1
130 INPUT "SEGMENT (MM) ";L2
140 PRINT
150 PRINT "USE VALUES IN DEGREES"
160 PRINT
170 INPUT "EARTH SEL. LONG. ";LE
180 INPUT "EARTH SEL. LAT. ";BE
190 INPUT "SUN SEL. COLONG. ";CS
200 INPUT "SUN SEL. LAT. ";BS
210 REM CONVERT DEG TO RADIANS
220 DR = 3.14159/180
230 LS = 90-CS
240 IF LS<0 THEN LS = 450-CS
250 BE = BE*DR: LE = LE*DR
260 BS = BS*DR: LS = LS*DR
270 CS = CS*DR
280 RM = 1080
290 EM = 239000
300 SM = 93000000
310 PRINT
320 PRINT "ENTER FEATURE DATA"
330 INPUT " SEL. LONGITUDE ";LO
340 INPUT " SEL. LATITUDE ";BO
350 INPUT " SHADOW (MM) ";MQ
360 BO = BO*DR: LO = LO*DR
370 I1 = SIN(BE)*SIN(BO)
380 I2 = SIN(BE)*SIN(BS)
390 I3 = SIN(BS)*SIN(BO)
400 I4 = COS(BE)*COS(BO)
410 I5 = COS(BE)*COS(BS)
420 I6 = COS(BS)*COS(BO)
430 EI = I1+14*COS(LO-LE)
440 ER = I2+I5*COS(LE-LS)
450 SI = I3+I6*COS(LO-LS)
460 RX = L1/SIN(2*ATN(L1/L2))
470 MR = MQ/RX
480 I7 = RM*RM: I8 = EM*EM
490 I9 = SM*SM
500 XE = SQR(I7+I8-2*RM*EM*EI)
510 ES = SQR(I8+I9-2*EM*SM*ER)
520 XS = SQR(I7+I9-2*RM*SM*SI)
530 S = (XE+ES+XS)/2
540 P = S*(S-ES)*(S-XE)*(S-XS)
550 P = (2/(XE*XS))*SQR(P)
560 SH = I3+I6*SIN(CS+LO)
570 M1 = (MR*SH/P)-1
580 M2 = (MR/P)*((MR/P)-2*SH)
590 H = (M1+SQR(M1*M1-M2))*RM
600 H = H*5280: H = INT(H)
610 PRINT "HEIGHT =";H;" FEET"
620 PRINT: PRINT "DO ANOTHER ";
630 PRINT "FROM SAME PHOTO";
640 INPUT " (Y/N) ";YN$
650 IF YN$="Y" THEN GOTO 310
660 END